home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / GNU / emacs.inst / emacs19.idb / usr / gnu / info / elisp-28.z / elisp-28
Encoding:
GNU Info File  |  1994-08-02  |  47.4 KB  |  1,212 lines

  1. This is Info file elisp, produced by Makeinfo-1.55 from the input file
  2. elisp.texi.
  3.  
  4.    This version is newer than the second printed edition of the GNU
  5. Emacs Lisp Reference Manual.  It corresponds to Emacs Version 19.19.
  6.  
  7.    Published by the Free Software Foundation 675 Massachusetts Avenue
  8. Cambridge, MA 02139 USA
  9.  
  10.    Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  11.  
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.  
  16.    Permission is granted to copy and distribute modified versions of
  17. this manual under the conditions for verbatim copying, provided that
  18. the entire resulting derived work is distributed under the terms of a
  19. permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that this permission notice may be stated in a
  24. translation approved by the Foundation.
  25.  
  26.    Permission is granted to copy and distribute modified versions of
  27. this manual under the conditions for verbatim copying, provided also
  28. that the section entitled "GNU Emacs General Public License" is included
  29. exactly as in the original, and provided that the entire resulting
  30. derived work is distributed under the terms of a permission notice
  31. identical to this one.
  32.  
  33.    Permission is granted to copy and distribute translations of this
  34. manual into another language, under the above conditions for modified
  35. versions, except that the section entitled "GNU Emacs General Public
  36. License" may be included in a translation approved by the Free Software
  37. Foundation instead of in the original English.
  38.  
  39. 
  40. File: elisp,  Node: Display,  Next: Calendar,  Prev: System Interface,  Up: Top
  41.  
  42. Emacs Display
  43. *************
  44.  
  45.    This chapter describes a number of features related to the display
  46. that Emacs presents to the user.
  47.  
  48. * Menu:
  49.  
  50. * Refresh Screen::      Clearing the screen and redrawing everything on it.
  51. * Screen Size::         How big is the Emacs screen.
  52. * Truncation::          Folding or wrapping long text lines.
  53. * The Echo Area::       Where messages are displayed.
  54. * Selective Display::   Hiding part of the buffer text.
  55. * Overlay Arrow::       Display of an arrow to indicate position.
  56. * Temporary Displays::  Displays that go away automatically.
  57. * Overlays::        Use overlays to highlight parts of the buffer.
  58. * Faces::        A face defines a graphics appearance: font, color, etc.
  59. * Blinking::            How Emacs shows the matching open parenthesis.
  60. * Inverse Video::    Specifying how the screen looks.
  61. * Usual Display::    The usual conventions for displaying nonprinting chars.
  62. * Display Tables::    How to specify other conventions.
  63. * Beeping::             Audible signal to the user.
  64. * Window Systems::      Which window system is being used.
  65.  
  66. 
  67. File: elisp,  Node: Refresh Screen,  Next: Screen Size,  Up: Display
  68.  
  69. Refreshing the Screen
  70. =====================
  71.  
  72.    The function `redraw-frame' redisplays the entire contents of a
  73. given frame.  *Note Frames::.
  74.  
  75.  - Function: redraw-frame FRAME
  76.      This function clears and redisplays frame FRAME.
  77.  
  78.    Even more powerful is `redraw-display'.
  79.  
  80.  - Command: redraw-display
  81.      This function clears and redisplays all visible frames.
  82.  
  83.    Normally, suspending and resuming Emacs also refreshes the screen.
  84. Some terminal emulators record separate contents for display-oriented
  85. programs such as Emacs and for ordinary sequential display.  If you are
  86. using such a terminal, you might want to inhibit the redisplay on
  87. resumption.  *Note Suspending Emacs::.
  88.  
  89.  - Variable: no-redraw-on-reenter
  90.      This variable controls whether Emacs redraws the entire screen
  91.      after it has been suspended and resumed.  Non-`nil' means yes,
  92.      `nil' means no.
  93.  
  94.    Processing user input takes absolute priority over redisplay.  If you
  95. call these functions when input is available, they do nothing
  96. immediately, but a full redisplay does happen eventually--after all the
  97. input has been processed.
  98.  
  99. 
  100. File: elisp,  Node: Screen Size,  Next: Truncation,  Prev: Refresh Screen,  Up: Display
  101.  
  102. Screen Size
  103. ===========
  104.  
  105.    The screen size functions report or tell Emacs the height or width of
  106. the terminal.  When you are using multiple frames, they apply to the
  107. selected frame (*note Frames::.).
  108.  
  109.  - Function: screen-height
  110.      This function returns the number of lines on the screen that are
  111.      available for display.
  112.  
  113.           (screen-height)
  114.                => 50
  115.  
  116.  - Function: screen-width
  117.      This function returns the number of columns on the screen that are
  118.      available for display.
  119.  
  120.           (screen-width)
  121.                => 80
  122.  
  123.  - Function: set-screen-height LINES &optional NOT-ACTUAL-SIZE
  124.      This function declares that the terminal can display LINES lines.
  125.      The sizes of existing windows are altered proportionally to fit.
  126.  
  127.      If NOT-ACTUAL-SIZE is non-`nil', then Emacs displays LINES lines
  128.      of output, but does not change its value for the actual height of
  129.      the screen.  (Knowing the correct actual size may be necessary for
  130.      correct cursor positioning.)  Using a smaller height than the
  131.      terminal actually implements may be useful to reproduce behavior
  132.      observed on a smaller screen, or if the terminal malfunctions when
  133.      using its whole screen.
  134.  
  135.      If LINES is different from what it was previously, then the entire
  136.      screen is cleared and redisplayed using the new size.
  137.  
  138.      This function returns `nil'.
  139.  
  140.  - Function: set-screen-width COLUMNS &optional NOT-ACTUAL-SIZE
  141.      This function declares that the terminal can display COLUMNS
  142.      columns.  The details are as in `set-screen-height'.
  143.  
  144. 
  145. File: elisp,  Node: Truncation,  Next: The Echo Area,  Prev: Screen Size,  Up: Display
  146.  
  147. Truncation
  148. ==========
  149.  
  150.    When a line of text extends beyond the right edge of a window, the
  151. line can either be truncated or continued on the next line.  When a line
  152. is truncated, this is shown with a `$' in the rightmost column of the
  153. window.  When a line is continued or "wrapped" onto the next line, this
  154. is shown with a `\' on the rightmost column of the window.  The
  155. additional screen lines used to display a long text line are called
  156. "continuation" lines.  (Note that wrapped lines are not filled; filling
  157. has nothing to do with continuation and truncation.  *Note Filling::.)
  158.  
  159.  - User Option: truncate-lines
  160.      This buffer-local variable controls how Emacs displays lines that
  161.      extend beyond the right edge of the window.  If it is non-`nil',
  162.      then Emacs does not display continuation lines; rather each line of
  163.      text occupies exactly one screen line, and a dollar sign appears
  164.      at the edge of any line that extends to or beyond the edge of the
  165.      window.  The default is `nil'.
  166.  
  167.      If the variable `truncate-partial-width-windows' is non-`nil',
  168.      then truncation is used for windows that are not the full width of
  169.      the screen, regardless of the value of `truncate-lines'.
  170.  
  171.  - Variable: default-truncate-lines
  172.      This variable is the default value for `truncate-lines' in buffers
  173.      that do not have local values for it.
  174.  
  175.  - User Option: truncate-partial-width-windows
  176.      This variable determines how lines that are too wide to fit on the
  177.      screen are displayed in side-by-side windows (*note Splitting
  178.      Windows::.).  If it is non-`nil', then wide lines are truncated
  179.      (with a `$' at the end of the line); otherwise they wrap to the
  180.      next screen line (with a `\' at the end of the line).
  181.  
  182.    You can override the images that indicate continuation or truncation
  183. with the display table; see *Note Display Tables::.
  184.  
  185. 
  186. File: elisp,  Node: The Echo Area,  Next: Selective Display,  Prev: Truncation,  Up: Display
  187.  
  188. The Echo Area
  189. =============
  190.  
  191.    The "echo area" is used for displaying messages made with the
  192. `message' primitive, and for echoing keystrokes.  It is not the same as
  193. the minibuffer, despite the fact that the minibuffer appears (when
  194. active) in the same place on the screen as the echo area.  The `GNU
  195. Emacs Manual' specifies the rules for resolving conflicts between the
  196. echo area and the minibuffer for use of that screen space (*note The
  197. Minibuffer: (emacs)Minibuffer.).  Error messages appear in the echo
  198. area; see *Note Errors::.
  199.  
  200.    You can write output in the echo area by using the Lisp printing
  201. functions with `t' as the stream (*note Output Functions::.), or as
  202. follows:
  203.  
  204.  - Function: message STRING &rest ARGUMENTS
  205.      This function prints a one-line message in the echo area.  The
  206.      argument STRING is similar to a C language `printf' control
  207.      string.  See `format' in *Note String Conversion::, for the details
  208.      on the conversion specifications.  `message' returns the
  209.      constructed string.
  210.  
  211.      If STRING is `nil', `message' clears the echo area.  If the
  212.      minibuffer is active, this brings the minibuffer contents back onto
  213.      the screen immediately.
  214.           (message
  215.            "Minibuffer depth is %d."
  216.            (minibuffer-depth))
  217.           => "Minibuffer depth is 0."
  218.           
  219.           ---------- Echo Area ----------
  220.           Minibuffer depth is 0.
  221.           ---------- Echo Area ----------
  222.  
  223.  - Variable: cursor-in-echo-area
  224.      This variable controls where the cursor appears when a message is
  225.      displayed in the echo area.  If it is non-`nil', then the cursor
  226.      appears at the end of the message.  Otherwise, the cursor appears
  227.      at point--not in the echo area at all.
  228.  
  229.      The value is normally `nil'; Lisp programs bind it to `t' for
  230.      brief periods of time.
  231.  
  232. 
  233. File: elisp,  Node: Selective Display,  Next: Overlay Arrow,  Prev: The Echo Area,  Up: Display
  234.  
  235. Selective Display
  236. =================
  237.  
  238.    "Selective display" is a class of minor modes in which specially
  239. marked lines do not appear on the screen, or in which highly indented
  240. lines do not appear.
  241.  
  242.    The first variant, explicit selective display, is designed for use in
  243. a Lisp program.  The program controls which lines are hidden by altering
  244. the text.  Outline mode uses this variant.  In the second variant, the
  245. choice of lines to hide is made automatically based on indentation.
  246. This variant is designed as a user-level feature.
  247.  
  248.    The way you control explicit selective display is by replacing a
  249. newline (control-j) with a control-m.  The text which was formerly a
  250. line following that newline is now invisible.  Strictly speaking, it is
  251. temporarily no longer a line at all, since only newlines can separate
  252. lines; it is now part of the previous line.
  253.  
  254.    Selective display does not directly affect editing commands.  For
  255. example, `C-f' (`forward-char') moves point unhesitatingly into
  256. invisible space.  However, the replacement of newline characters with
  257. carriage return characters affects some editing commands.  For example,
  258. `next-line' skips invisible lines, since it searches only for newlines.
  259. Modes that use selective display can also define commands that take
  260. account of the newlines, or which make parts of the text visible or
  261. invisible.
  262.  
  263.    When you write a selectively displayed buffer into a file, all the
  264. control-m's are replaced by their original newlines.  This means that
  265. when you next read in the file, it looks OK, with nothing invisible.
  266. The selective display effect is seen only within Emacs.
  267.  
  268.  - Variable: selective-display
  269.      This buffer-local variable enables selective display.  This means
  270.      that lines, or portions of lines, may be made invisible.
  271.  
  272.         * If the value of `selective-display' is `t', then any portion
  273.           of a line that follows a control-m is not displayed.
  274.  
  275.         * If the value of `selective-display' is a positive integer,
  276.           then lines that start with more than `selective-display'
  277.           columns of indentation are not displayed.
  278.  
  279.      When some portion of a buffer is invisible, the vertical movement
  280.      commands operate as if that portion did not exist, allowing a
  281.      single `next-line' command to skip any number of invisible lines.
  282.      However, character movement commands (such as `forward-char') do
  283.      not skip the invisible portion, and it is possible (if tricky) to
  284.      insert or delete text in an invisible portion.
  285.  
  286.      In the examples below, what is shown is the *display* of the buffer
  287.      `foo', which changes with the value of `selective-display'.  The
  288.      *contents* of the buffer do not change.
  289.  
  290.           (setq selective-display nil)
  291.                => nil
  292.           
  293.           ---------- Buffer: foo ----------
  294.           1 on this column
  295.            2on this column
  296.             3n this column
  297.             3n this column
  298.            2on this column
  299.           1 on this column
  300.           ---------- Buffer: foo ----------
  301.           
  302.           (setq selective-display 2)
  303.                => 2
  304.           
  305.           ---------- Buffer: foo ----------
  306.           1 on this column
  307.            2on this column
  308.            2on this column
  309.           1 on this column
  310.           ---------- Buffer: foo ----------
  311.  
  312.  - Variable: selective-display-ellipses
  313.      If this buffer-local variable is non-`nil', then Emacs displays
  314.      `...' at the end of a line that is followed by invisible text.
  315.      This example is a continuation of the previous one.
  316.  
  317.           (setq selective-display-ellipses t)
  318.                => t
  319.           
  320.           ---------- Buffer: foo ----------
  321.           1 on this column
  322.            2on this column ...
  323.            2on this column
  324.           1 on this column
  325.           ---------- Buffer: foo ----------
  326.  
  327.      You can use a display table to substitute other text for the
  328.      ellipsis (`...').  *Note Display Tables::.
  329.  
  330. 
  331. File: elisp,  Node: Overlay Arrow,  Next: Temporary Displays,  Prev: Selective Display,  Up: Display
  332.  
  333. Overlay Arrow
  334. =============
  335.  
  336.    The "overlay arrow" is useful for directing the user's attention to
  337. a particular line in a buffer.  For example, in the modes used for
  338. interface to debuggers, the overlay arrow indicates the line of code
  339. about to be executed.
  340.  
  341.  - Variable: overlay-arrow-string
  342.      This variable holds the string to display as an arrow, or `nil' if
  343.      the arrow feature is not in use.
  344.  
  345.  - Variable: overlay-arrow-position
  346.      This variable holds a marker which indicates where to display the
  347.      arrow.  It should point at the beginning of a line.  The arrow
  348.      text is displayed at the beginning of that line, overlaying any
  349.      text that would otherwise appear.  Since the arrow is usually
  350.      short, and the line usually begins with indentation, normally
  351.      nothing significant is overwritten.
  352.  
  353.      The overlay string is displayed only in the buffer which this
  354.      marker points into.  Thus, only one buffer can have an overlay
  355.      arrow at any given time.
  356.  
  357. 
  358. File: elisp,  Node: Temporary Displays,  Next: Overlays,  Prev: Overlay Arrow,  Up: Display
  359.  
  360. Temporary Displays
  361. ==================
  362.  
  363.    Temporary displays are used by commands to put output into a buffer
  364. and then present it to the user for perusal rather than for editing.
  365. Many of the help commands use this feature.
  366.  
  367.  - Special Form: with-output-to-temp-buffer BUFFER-NAME FORMS...
  368.      This function executes FORMS while arranging to insert any output
  369.      they print into the buffer named BUFFER-NAME.  The buffer is then
  370.      shown in some window for viewing, displayed but not selected.
  371.  
  372.      The string BUFFER-NAME specifies the temporary buffer, which need
  373.      not already exist.  The argument must be a string, not a buffer.
  374.      The buffer is erased initially (with no questions asked), and it is
  375.      marked as unmodified after `with-output-to-temp-buffer' exits.
  376.  
  377.      `with-output-to-temp-buffer' binds `standard-output' to the
  378.      temporary buffer, then it evaluates the forms in FORMS.  Output
  379.      using the Lisp output functions within FORMS goes by default to
  380.      that buffer (but screen display and messages in the echo area,
  381.      although output in the general sense of the word, are not
  382.      affected).  *Note Output Functions::.
  383.  
  384.      The value of the last form in FORMS is returned.
  385.  
  386.           ---------- Buffer: foo ----------
  387.            This is the contents of foo.
  388.           ---------- Buffer: foo ----------
  389.           
  390.           (with-output-to-temp-buffer "foo"
  391.               (print 20)
  392.               (print standard-output))
  393.           => #<buffer foo>
  394.           
  395.           ---------- Buffer: foo ----------
  396.           20
  397.           
  398.           #<buffer foo>
  399.           
  400.           ---------- Buffer: foo ----------
  401.  
  402.  - Variable: temp-buffer-show-function
  403.      The value of this variable, if non-`nil', is called as a function
  404.      to display a help buffer.  This variable is used by
  405.      `with-output-to-temp-buffer'.
  406.  
  407.      In Emacs versions 18 and earlier, this variable was called
  408.      `temp-buffer-show-hook'.
  409.  
  410.  - Function: momentary-string-display STRING POSITION &optional CHAR
  411.           MESSAGE
  412.      This function momentarily displays STRING in the current buffer at
  413.      POSITION (which is a character offset from the beginning of the
  414.      buffer).  The display remains until the next character is typed.
  415.  
  416.      If the next character the user types is CHAR, Emacs ignores it.
  417.      Otherwise, that character remains buffered for subsequent use as
  418.      input.  Thus, typing CHAR will simply remove the string from the
  419.      display, while typing (say) `C-f' will remove the string from the
  420.      display and later (presumably) move point forward.  The argument
  421.      CHAR is a space by default.
  422.  
  423.      The return value of `momentary-string-display' is not meaningful.
  424.  
  425.      If MESSAGE is non-`nil', it is displayed in the echo area while
  426.      STRING is displayed in the buffer.  If it is `nil', then
  427.      instructions to type CHAR are displayed there, e.g., `Type RET to
  428.      continue editing'.
  429.  
  430.      In this example, point is initially located at the beginning of the
  431.      second line:
  432.  
  433.           ---------- Buffer: foo ----------
  434.           This is the contents of foo.
  435.           -!-Second line.
  436.           ---------- Buffer: foo ----------
  437.           
  438.           (momentary-string-display
  439.              "**** Important Message! ****" (point) ?\r
  440.              "Type RET when done reading")
  441.           => t
  442.           
  443.           ---------- Buffer: foo ----------
  444.           This is the contents of foo.
  445.           **** Important Message! ****Second line.
  446.           ---------- Buffer: foo ----------
  447.           
  448.           ---------- Echo Area ----------
  449.           Type RET when done reading
  450.           ---------- Echo Area ----------
  451.  
  452.      This function works by actually changing the text in the buffer.
  453.      As a result, if you later undo in this buffer, you will see the
  454.      message come and go.
  455.  
  456. 
  457. File: elisp,  Node: Overlays,  Next: Faces,  Prev: Temporary Displays,  Up: Display
  458.  
  459. Overlays
  460. ========
  461.  
  462.    You can use "overlays" to alter the appearance of a buffer's text on
  463. the screen.  An overlay is an object which belongs to a particular
  464. buffer, and has a specified beginning and end.  It also has properties
  465. which you can examine and set; these affect the display of the text
  466. within the overlay.
  467.  
  468. * Menu:
  469.  
  470. * Overlay Properties::    How to read and set properties.
  471.             What properties do to the screen display.
  472. * Managing Overlays::   Creating, moving, finding overlays.
  473.  
  474. 
  475. File: elisp,  Node: Overlay Properties,  Next: Managing Overlays,  Up: Overlays
  476.  
  477. Overlay Properties
  478. ------------------
  479.  
  480.    Overlay properties are like text properties in some respects, but the
  481. differences are more important than the similarities.  Text properties
  482. are considered a part of the text; overlays are specifically considered
  483. not to be part of the text.  Thus, copying text between various buffers
  484. and strings preserves text properties, but does not try to preserve
  485. overlays.  Changing a buffer's text properties marks the buffer as
  486. modified, while moving an overlay or changing its properties does not.
  487.  
  488. `face'
  489.      This property controls the font and color of text.  *Note Faces::,
  490.      for more information.  This feature is temporary; in the future,
  491.      we may replace it with other ways of specifying how to display
  492.      text.
  493.  
  494. `mouse-face'
  495.      This property is used instead of `face' when the mouse is within
  496.      the range of the overlay.  This feature is not yet implemented,
  497.      and may be temporary.  It is documented here because we are likely
  498.      to implement it this way at least for a while.
  499.  
  500. `priority'
  501.      This property's value (which should be a nonnegative number)
  502.      determines the priority of the overlay.  The priority matters when
  503.      two or more overlays cover the same character and both specify a
  504.      face for display; the one whose `priority' value is larger takes
  505.      priority over the other, and its face attributes override the face
  506.      attributes of the lower priority overlay.
  507.  
  508.      Currently, all overlays take priority over text properties.  Please
  509.      avoid using negative priority values, as we have not yet decided
  510.      just what they should mean.
  511.  
  512. `window'
  513.      If the `window' property is non-`nil', then the overlay applies
  514.      only on that window.
  515.  
  516. `before-string'
  517.      This property's value is a string to add to the display at the
  518.      beginning of the overlay.  The string does not appear in the
  519.      buffer in any sense--only on the screen.  This is not yet
  520.      implemented, but will be.
  521.  
  522. `after-string'
  523.      This property's value is a string to add to the display at the end
  524.      of the overlay.  The string does not appear in the buffer in any
  525.      sense--only on the screen.  This is not yet implemented, but will
  526.      be.
  527.  
  528. `modification-hooks'
  529.      This property's value is a list of functions to be called if any
  530.      character within the overlay is changed or if text is inserted
  531.      strictly within the overlay.  Each function receives two
  532.      arguments: the beginning and end of the part of the buffer being
  533.      modified.
  534.  
  535. `insert-in-front-hooks'
  536.      This property's value is a list of functions to be called if text
  537.      is inserted right at the beginning of the overlay.
  538.  
  539. `insert-behind-hooks'
  540.      This property's value is a list of functions to be called if text
  541.      is inserted right at the end of the overlay.
  542.  
  543.    These are the functions for reading and writing the properties of an
  544. overlay.
  545.  
  546.  - Function: overlay-get OVERLAY PROP
  547.      This function returns the value of property PROP recorded in
  548.      OVERLAY.  If OVERLAY does not record any value for that property,
  549.      then the value is `nil'.
  550.  
  551.  - Function: overlay-put OVERLAY PROP VALUE
  552.      This function set the value of property PROP recorded in OVERLAY
  553.      to VALUE.  It returns VALUE.
  554.  
  555. 
  556. File: elisp,  Node: Managing Overlays,  Prev: Overlay Properties,  Up: Overlays
  557.  
  558. Managing Overlays
  559. -----------------
  560.  
  561.  - Function: make-overlay START END &optional BUFFER
  562.      This function creates and returns an overlay which belongs to
  563.      BUFFER and ranges from START to END.  Both START and END must
  564.      specify buffer positions; they may be integers or markers.  If
  565.      BUFFER is omitted, the overlay is created in the current buffer.
  566.  
  567.      The return value is the overlay itself.
  568.  
  569.  - Function: overlay-start OVERLAY
  570.      This function returns the position at which OVERLAY starts.
  571.  
  572.  - Function: overlay-end OVERLAY
  573.      This function returns the position at which OVERLAY ends.
  574.  
  575.  - Function: overlay-buffer OVERLAY
  576.      This function returns the buffer that OVERLAY belongs to.
  577.  
  578.  - Function: delete-overlay OVERLAY
  579.      This function deletes OVERLAY.  The overlay continues to exist as
  580.      a Lisp object, but ceases to be part of the buffer it belonged to,
  581.      and ceases to have any effect on display.
  582.  
  583.  - Function: move-overlay OVERLAY START END &optional BUFFER
  584.      This function moves OVERLAY to BUFFER, and places its bounds at
  585.      START and END.  Both arguments START and END must specify buffer
  586.      positions; they may be integers or markers.  If BUFFER is omitted,
  587.      the overlay stays in the same buffer.
  588.  
  589.      The return value is OVERLAY.
  590.  
  591.      This is the only valid way to change the endpoints of an overlay.
  592.      Do not try modifying the markers in the overlay by hand, as that
  593.      fails to update other vital data structures and can cause some
  594.      overlays to be "lost".
  595.  
  596.  - Function: overlays-at POS
  597.      This function returns a list of all the overlays that contain
  598.      position POS in the current buffer.  The list is in no particular
  599.      order.  An overlay contains position POS if it begins at or before
  600.      POS, and ends after POS.
  601.  
  602.  - Function: next-overlay-change POS
  603.      This function returns the buffer position of the next beginning or
  604.      end of an overlay, after POS.
  605.  
  606. 
  607. File: elisp,  Node: Faces,  Next: Blinking,  Prev: Overlays,  Up: Display
  608.  
  609. Faces
  610. =====
  611.  
  612.    A "face" is a named collection of graphical attributes: font,
  613. foreground color, background color and optional underlining.  Faces
  614. control the display of text on the screen.
  615.  
  616.    Each face has its own "face id number" which distinguishes faces at
  617. low levels within Emacs.  However, for most purposes, you can refer to
  618. faces in Lisp programs by their names.
  619.  
  620.    Each face name is meaningful for all frames, and by default it has
  621. the same meaning in all frames.  But you can arrange to give a
  622. particular face name a special meaning in one frame if you wish.
  623.  
  624.    The face named `default' is used for ordinary text.  The face named
  625. `modeline' is used for displaying the mode line and menu bars.  The
  626. face named `region' is used for highlighting the region (in Transient
  627. Mark mode only).
  628.  
  629. * Menu:
  630.  
  631. * Merging Faces::    How Emacs decides which face to use for a character.
  632. * Face Functions::    How to define and examine faces.
  633.  
  634. 
  635. File: elisp,  Node: Merging Faces,  Next: Face Functions,  Up: Faces
  636.  
  637. Merging Faces for Display
  638. -------------------------
  639.  
  640.    Here are all the ways to specify which face to use for display of
  641. text:
  642.  
  643.    * With defaults.  Each frame has a "default face", whose id number is
  644.      zero, which is used for all text that doesn't somehow specify
  645.      another face.
  646.  
  647.    * With text properties.  A character may have a `face' property; if
  648.      so, it's displayed with that face.  If the character has a
  649.      `mouse-face' property, that is used instead of the `face' property
  650.      when the mouse is "near enough" to the character.  *Note Special
  651.      Properties::.
  652.  
  653.    * With overlays.  An overlay may have `face' and `mouse-face'
  654.      properties too; they apply to all the text covered by the overlay.
  655.  
  656.    * With special glyphs.  Each glyph can specify a particular face id
  657.      number.  *Note Glyphs::.
  658.  
  659.    If these various sources together specify more than one face for a
  660. particular character, Emacs merges the attributes of the various faces
  661. specified.  The attributes of the faces of special glyphs come first;
  662. then come attributes of faces from overlays, followed by those from text
  663. properties, and last the default face.
  664.  
  665.    When multiple overlays cover one character, an overlay with higher
  666. priority overrides those with lower priority.  *Note Overlays::.
  667.  
  668.    If an attribute such as the font or a color is not specified in any
  669. of the above ways, the frame's own font or color is used.
  670.  
  671. 
  672. File: elisp,  Node: Face Functions,  Prev: Merging Faces,  Up: Faces
  673.  
  674. Functions for Working with Faces
  675. --------------------------------
  676.  
  677.    The attributes a face can specify include the font, the foreground
  678. color, the background color, and underlining.  The face can also leave
  679. these unspecified by giving the value `nil' for them.
  680.  
  681.    Here are the primitives for creating and changing faces.
  682.  
  683.  - Function: make-face NAME
  684.      This function defines a new face named NAME, initially with all
  685.      attributes `nil'.  It does nothing if there is already a face named
  686.      NAME.
  687.  
  688.  - Function: face-list
  689.      This function returns a list of all defined face names.
  690.  
  691.  - Function: copy-face OLD-FACE NEW-NAME &optional FRAME NEW-FRAME
  692.      This function defines a new face named NEW-NAME which is a copy of
  693.      the existing face named OLD-FACE.  If there is already a face
  694.      named NEW-NAME, then it alters the face to have the same
  695.      attributes as OLD-FACE.
  696.  
  697.      If the optional argument FRAME is given, this function applies
  698.      only to that frame.  Otherwise it applies to each frame
  699.      individually, copying attributes from OLD-FACE in that frame to
  700.      NEW-FACE in the same frame.
  701.  
  702.      If the optional argument NEW-FRAME is given, then `copy-face'
  703.      copies the attributes of OLD-FACE in FRAME to NEW-NAME in
  704.      NEW-FRAME.
  705.  
  706.    You can modify the attributes of an existing face with the following
  707. functions.  If you specify FRAME, they affect just that frame;
  708. otherwise, they affect all frames as well as the defaults that apply to
  709. new frames.
  710.  
  711.  - Function: set-face-foreground FACE COLOR &optional FRAME
  712.  - Function: set-face-background FACE COLOR &optional FRAME
  713.      These functions set the foreground (respectively, background)
  714.      color of face FACE to COLOR.  The argument COLOR color should be a
  715.      string, the name of a color.
  716.  
  717.  - Function: set-face-font FACE FONT &optional FRAME
  718.      This function sets the font of face FACE.  The argument FONT
  719.      should be a string.
  720.  
  721.  - Function: set-face-underline-p FACE UNDERLINE-P &optional FRAME
  722.      This function sets the underline attribute of face FACE.
  723.  
  724.  - Function: invert-face FACE &optional FRAME
  725.      Swap the foreground and background colors of face FACE.  If the
  726.      face doesn't specify both foreground and background, then its
  727.      foreground and background are set to the default background and
  728.      foreground.
  729.  
  730.    These functions examine the attributes of a face.  If you don't
  731. specify FRAME, they refer to the default data for new frames.
  732.  
  733.  - Function: face-foreground FACE &optional FRAME
  734.  - Function: face-background FACE &optional FRAME
  735.      These functions return the foreground (respectively, background)
  736.      color of face FACE.  The argument COLOR color should be a string,
  737.      the name of a color.
  738.  
  739.  - Function: face-font FACE &optional FRAME
  740.      This function returns the name of the font of face FACE.
  741.  
  742.  - Function: face-underline-p FACE &optional FRAME
  743.      This function returns the underline attribute of face FACE.
  744.  
  745.  - Function: face-id-number FACE
  746.      This function returns the id number of face FACE.
  747.  
  748.  - Function: face-equal FACE1 FACE2 &optional FRAME
  749.      This returns `t' if the faces FACE1 and FACE2 have the same
  750.      attributes for display.
  751.  
  752.  - Function: face-differs-from-default-p FACE &optional FRAME
  753.      This returns `t' if the face FACE displays differently from the
  754.      default face.  A face is considered to be "the same" as the normal
  755.      face if each attribute is either the same as that of the default
  756.      face or `nil' (meaning to inherit from the default).
  757.  
  758.  - Variable: region-face
  759.      This variable's value specifies the face id to use to display
  760.      characters in the region when it is active (in Transient Mark mode
  761.      only).  The face thus specified takes precedence over all faces
  762.      that come from text properties and overlays, for characters in the
  763.      region.  *Note The Mark::, for more information about Transient
  764.      Mark mode.
  765.  
  766.      Normally, the value is the id number of the face named `region'.
  767.  
  768. 
  769. File: elisp,  Node: Blinking,  Next: Inverse Video,  Prev: Faces,  Up: Display
  770.  
  771. Blinking
  772. ========
  773.  
  774.    This section describes the mechanism by which Emacs shows a matching
  775. open parenthesis when the user inserts a close parenthesis.
  776.  
  777.  - Variable: blink-paren-function
  778.      The value of this variable should be a function (of no arguments)
  779.      to be called whenever a char with close parenthesis syntax is
  780.      inserted.  The value of `blink-paren-function' may be `nil', in
  781.      which case nothing is done.
  782.  
  783.           *Please note:* this variable was named `blink-paren-hook' in
  784.           older Emacs versions, but since it is not called with the
  785.           standard convention for hooks, it was renamed to
  786.           `blink-paren-function' in version 19.
  787.  
  788.  - Variable: blink-matching-paren
  789.      If this variable is `nil', then `blink-matching-open' does nothing.
  790.  
  791.  - Variable: blink-matching-paren-distance
  792.      This variable specifies the maximum distance to scan for a matching
  793.      parenthesis before giving up.
  794.  
  795.  - Function: blink-matching-open
  796.      This function is the default value of `blink-paren-function'.  It
  797.      assumes that point follows a character with close parenthesis
  798.      syntax and moves the cursor momentarily to the matching opening
  799.      character.  If that character is not already on the screen, then
  800.      its context is shown by displaying it in the echo area.  To avoid
  801.      long delays, this function does not search farther than
  802.      `blink-matching-paren-distance' characters.
  803.  
  804.      Here is an example of calling this function explicitly.
  805.  
  806.           (defun interactive-blink-matching-open ()
  807.             "Indicate momentarily the start of sexp before point."
  808.             (interactive)
  809.  
  810.           (let ((blink-matching-paren-distance
  811.                    (buffer-size))
  812.                   (blink-matching-paren t))
  813.               (blink-matching-open)))
  814.  
  815. 
  816. File: elisp,  Node: Inverse Video,  Next: Usual Display,  Prev: Blinking,  Up: Display
  817.  
  818. Inverse Video
  819. =============
  820.  
  821.  - User Option: inverse-video
  822.      This variable controls whether Emacs uses inverse video for all
  823.      text on the screen.  Non-`nil' means yes, `nil' means no.  The
  824.      default is `nil'.
  825.  
  826.  - User Option: mode-line-inverse-video
  827.      This variable controls the use of inverse video for mode lines.
  828.      If it is non-`nil', then mode lines are displayed in inverse video
  829.      (under X, this uses the face named `modeline', which you can set
  830.      as you wish).  Otherwise, mode lines are displayed normally, just
  831.      like text.  The default is `t'.
  832.  
  833. 
  834. File: elisp,  Node: Usual Display,  Next: Display Tables,  Prev: Inverse Video,  Up: Display
  835.  
  836. Usual Display Conventions
  837. =========================
  838.  
  839.    The usual display conventions define how to display each character
  840. code.  You can override these conventions by setting up a display table
  841. (*note Display Tables::.).  Here are the usual display conventions:
  842.  
  843.    * Character codes 32 through 126 map to glyph codes 32 through 126.
  844.      Normally this means they display as themselves.
  845.  
  846.    * Character code 9 is a horizontal tab.  It displays as whitespace
  847.      up to a position determined by `tab-width'.
  848.  
  849.    * Character code 10 is a newline.
  850.  
  851.    * All other codes in the range 0 through 31, and code 127, display
  852.      in one of two ways according to the value of `ctl-arrow'.  If it
  853.      is is non-`nil', these codes map to sequences of two glyphs, where
  854.      the first glyph is the ASCII code for `^'.  Otherwise, these codes
  855.      map just like the codes in the range 128 to 255.
  856.  
  857.    * Character codes 128 through 255 map to sequences of four glyphs,
  858.      where the first glyph is the ASCII code for `\', and the others
  859.      are digit characters representing the code in octal.
  860.  
  861.    The usual display conventions apply even when there is a display
  862. table, for any character whose entry in the active display table is
  863. `nil'.  Thus, when you set up a display table, you need only specify
  864. the the characters for which you want unusual behavior.
  865.  
  866.    These variables affect the way certain characters are displayed on
  867. the screen.  Since they change the number of columns the characters
  868. occupy, they also affect the indentation functions.
  869.  
  870.  - User Option: ctl-arrow
  871.      This buffer-local variable controls how control characters are
  872.      displayed.  If it is non-`nil', they are displayed as a caret
  873.      followed by the character: `^A'.  If it is `nil', they are
  874.      displayed as a backslash followed by three octal digits: `\001'.
  875.  
  876.  - Variable: default-ctl-arrow
  877.      The value of this variable is the default value for `ctl-arrow' in
  878.      buffers that do not override it.  This is the same as executing the
  879.      following expression:
  880.  
  881.           (default-value 'ctl-arrow)
  882.  
  883.      *Note Default Value::.
  884.  
  885.  - User Option: tab-width
  886.      The value of this variable is the spacing between tab stops used
  887.      for displaying tab characters in Emacs buffers.  The default is 8.
  888.      Note that this feature is completely independent from the
  889.      user-settable tab stops used by the command `tab-to-tab-stop'.
  890.      *Note Indent Tabs::.
  891.  
  892. 
  893. File: elisp,  Node: Display Tables,  Next: Beeping,  Prev: Usual Display,  Up: Display
  894.  
  895. Display Tables
  896. ==============
  897.  
  898.    You can use the "display table" feature to control how all 256
  899. possible character codes display on the screen.  This is useful for
  900. displaying European languages that have letters not in the ASCII
  901. character set.
  902.  
  903.    The display table maps each character code into a sequence of
  904. "glyphs", each glyph being an image that takes up one character
  905. position on the screen.  You can also define how to display each glyph
  906. on your terminal, using the "glyph table".
  907.  
  908. * Menu:
  909.  
  910. * Display Table Format::    What a display table consists of.
  911. * Active Display Table::    How Emacs selects a display table to use.
  912. * Glyphs::            How to define a glyph, and what glyphs mean.
  913. * ISO Latin 1::            How to use display tables
  914.                   to support the ISO Latin 1 character set.
  915.  
  916. 
  917. File: elisp,  Node: Display Table Format,  Next: Active Display Table,  Up: Display Tables
  918.  
  919. Display Table Format
  920. --------------------
  921.  
  922.    A display table is actually an array of 261 elements.
  923.  
  924.  - Function: make-display-table
  925.      This creates and returns a display table.  The table initially has
  926.      `nil' in all elements.
  927.  
  928.    The first 256 elements correspond to character codes; the Nth
  929. element says how to display the character code N.  The value should be
  930. `nil' or a vector of glyph values (*note Glyphs::.).  If an element is
  931. `nil', it says to display that character according to the usual display
  932. conventions (*note Usual Display::.).
  933.  
  934.    The remaining five elements of a display table serve special
  935. purposes, and `nil' means use the default stated below.
  936.  
  937. 256
  938.      The glyph for the end of a truncated screen line (the default for
  939.      this is `$').  *Note Glyphs::.
  940.  
  941. 257
  942.      The glyph for the end of a continued line (the default is `\').
  943.  
  944. 258
  945.      The glyph for indicating a character displayed as an octal
  946.      character code (the default is `\').
  947.  
  948. 259
  949.      The glyph for indicating a control character (the default is `^').
  950.  
  951. 260
  952.      A vector of glyphs for indicating the presence of invisible lines
  953.      (the default is `...').  *Note Selective Display::.
  954.  
  955.    For example, here is how to construct a display table that mimics the
  956. effect of setting `ctl-arrow' to a non-`nil' value:
  957.  
  958.      (setq disptab (make-display-table))
  959.      (let ((i 0))
  960.        (while (< i 32)
  961.          (or (= i ?\t) (= i ?\n)
  962.              (aset disptab i (vector ?^ (+ i 64))))
  963.          (setq i (1+ i)))
  964.        (aset disptab 127 (vector ?^ ??)))
  965.  
  966. 
  967. File: elisp,  Node: Active Display Table,  Next: Glyphs,  Prev: Display Table Format,  Up: Display Tables
  968.  
  969. Active Display Table
  970. --------------------
  971.  
  972.    Each window can specify a display table, and so can each buffer.
  973. When a buffer B is displayed in window W, display uses the display
  974. table for window W if it has one; otherwise, the display table for
  975. buffer B if it has one; otherwise, the standard display table if any.
  976. The display table chosen is called the "active" display table.
  977.  
  978.  - Function: window-display-table WINDOW
  979.      This function returns WINDOW's display table, or `nil' if WINDOW
  980.      does not have an assigned display table.
  981.  
  982.  - Function: set-window-display-table WINDOW TABLE
  983.      This function sets the display table of WINDOW to TABLE.  The
  984.      argument TABLE should be either a display table or `nil'.
  985.  
  986.  - Variable: buffer-display-table
  987.      This variable is automatically local in all buffers; its value in a
  988.      particular buffer is the display table for that buffer, or `nil' if
  989.      the buffer does not have any assigned display table.
  990.  
  991.  - Variable: standard-display-table
  992.      This variable's value is the default display table, used when
  993.      neither the current buffer nor the window displaying it has an
  994.      assigned display table.  This variable is `nil' by default.
  995.  
  996.    If neither the selected window nor the current buffer has a display
  997. table, and if the variable `standard-display-table' is `nil', then
  998. Emacs uses the usual display conventions.  *Note Usual Display::.
  999.  
  1000. 
  1001. File: elisp,  Node: Glyphs,  Next: ISO Latin 1,  Prev: Active Display Table,  Up: Display Tables
  1002.  
  1003. Glyphs
  1004. ------
  1005.  
  1006.    A "glyph" is a generalization of a character; it stands for an image
  1007. that takes up a single character position on the screen.  Glyphs are
  1008. represented in Lisp as integers, just as characters are.
  1009.  
  1010.    The meaning of each integer, as a glyph, is defined by the glyph
  1011. table, which is the value of the variable `glyph-table'.
  1012.  
  1013.  - Variable: glyph-table
  1014.      The value of this variable is the current glyph table.  It should
  1015.      be a vector; the Gth element defines glyph code G.  If the value
  1016.      is `nil' instead of a vector, then all glyphs are simple (see
  1017.      below).
  1018.  
  1019.    Here are the possible types of elements in the glyph table:
  1020.  
  1021. INTEGER
  1022.      Define this glyph code as an alias for code INTEGER.  This is used
  1023.      with X Windows to specify a face code.
  1024.  
  1025. STRING
  1026.      Send the characters in STRING to the terminal to output this
  1027.      glyph.  This alternative is available on character terminals, but
  1028.      not under X.
  1029.  
  1030. `NIL'
  1031.      This glyph is simple.  On an ordinary terminal, the glyph code mod
  1032.      256 is the character to output.  With X, the glyph code mod 256 is
  1033.      character to output, and the glyph code divided by 256 specifies
  1034.      the "face id number" to use while outputting it.  *Note Faces::.
  1035.  
  1036.    If a glyph code is greater than or equal to the length of the glyph
  1037. table, that code is automatically simple.
  1038.  
  1039. 
  1040. File: elisp,  Node: ISO Latin 1,  Prev: Glyphs,  Up: Display Tables
  1041.  
  1042. ISO Latin 1
  1043. -----------
  1044.  
  1045.    If you have a terminal that can handle the entire ISO Latin 1
  1046. character set, you can arrange to use that character set as follows:
  1047.  
  1048.      (require 'disp-table)
  1049.      ;; Set char codes 160--255 to display as themselves.
  1050.      ;; (Codes 128--159 are the additional control characters.)
  1051.      (standard-display-8bit 160 255)
  1052.  
  1053.    If you are editing buffers written in the ISO Latin 1 character set
  1054. and your terminal doesn't handle anything but ASCII, you can load the
  1055. file `iso-ascii' to set up a display table which makes the other ISO
  1056. characters display as sequences of ASCII characters.  For example, the
  1057. character "o with umlaut" displays as `{"o}'.
  1058.  
  1059.    Some European countries have terminals that don't support ISO Latin 1
  1060. but do support the special characters for that country's language.  You
  1061. can define a display table to work one language using such terminals.
  1062. For an example, see `lisp/iso-swed.el', which handles certain Swedish
  1063. terminals.
  1064.  
  1065.    You can load the appropriate display table for your terminal
  1066. automatically by writing a terminal-specific Lisp file for the terminal
  1067. type.
  1068.  
  1069. 
  1070. File: elisp,  Node: Beeping,  Next: Window Systems,  Prev: Display Tables,  Up: Display
  1071.  
  1072. Beeping
  1073. =======
  1074.  
  1075.    You can make Emacs ring a bell (or blink the screen) to attract the
  1076. user's attention.  Be conservative about how often you do this; frequent
  1077. bells can become irritating.  Also be careful not to use beeping alone
  1078. when signaling an error is appropriate.  (*Note Errors::.)
  1079.  
  1080.  - Function: ding &optional DONT-TERMINATE
  1081.      This function beeps, or flashes the screen (see `visible-bell'
  1082.      below).  It also terminates any keyboard macro currently executing
  1083.      unless DONT-TERMINATE is non-`nil'.
  1084.  
  1085.  - Function: beep &optional DONT-TERMINATE
  1086.      This is a synonym for `ding'.
  1087.  
  1088.  - Variable: visible-bell
  1089.      This variable determines whether Emacs should flash the screen to
  1090.      represent a bell.  Non-`nil' means yes, `nil' means no.  This is
  1091.      effective only if the Termcap entry for the terminal in use has the
  1092.      visible bell flag (`vb') set.
  1093.  
  1094. 
  1095. File: elisp,  Node: Window Systems,  Prev: Beeping,  Up: Display
  1096.  
  1097. Window Systems
  1098. ==============
  1099.  
  1100.    Emacs works with several window systems, most notably the X Window
  1101. Syste,.  Note that both Emacs and X use the term "window", but use it
  1102. differently.  An Emacs frame is a single window as far as X is
  1103. concerned; the individual Emacs windows are not known to X at all.
  1104.  
  1105.  - Variable: window-system
  1106.      This variable tells Lisp programs what window system Emacs is
  1107.      running under.  Its value should be a symbol such as `x' (if Emacs
  1108.      is running under X) or `nil' (if Emacs is running on an ordinary
  1109.      terminal).
  1110.  
  1111.  - Variable: window-system-version
  1112.      This variable distinguishes between different versions of the X
  1113.      Window System.  Its value is 10 or 11 when using X; `nil'
  1114.      otherwise.
  1115.  
  1116.  - Variable: window-setup-hook
  1117.      This variable is a normal hook which Emacs runs after loading your
  1118.      `.emacs' file and the default initialization file (if any), after
  1119.      loading terminal-specific Lisp code, and after running the hook
  1120.      `term-setup-hook'.
  1121.  
  1122.      This hook is used for internal purposes: setting up communication
  1123.      with the window system, and creating the initial window.  Users
  1124.      should not interfere with it.
  1125.  
  1126. 
  1127. File: elisp,  Node: Calendar,  Next: Tips,  Prev: Display,  Up: Top
  1128.  
  1129. Customizing the Calendar and Diary
  1130. **********************************
  1131.  
  1132.    There are many customizations that you can use to make the calendar
  1133. and diary suit your personal tastes.
  1134.  
  1135. * Menu:
  1136.  
  1137. * Calendar Customizing::   Defaults you can set.
  1138. * Holiday Customizing::    Defining your own holidays.
  1139. * Date Display Format::    Changing the format.
  1140. * Time Display Format::    Changing the format.
  1141. * Daylight Savings::       Changing the default.
  1142. * Diary Customizing::      Defaults you can set.
  1143. * Hebrew/Islamic Entries:: How to obtain them.
  1144. * Fancy Diary Display::    Enhancing the diary display, sorting entries.
  1145. * Included Diary Files::   Sharing a common diary file.
  1146. * Sexp Diary Entries::     Fancy things you can do.
  1147. * Appt Customizing::       Customizing appointment reminders.
  1148.  
  1149. 
  1150. File: elisp,  Node: Calendar Customizing,  Next: Holiday Customizing,  Up: Calendar
  1151.  
  1152. Customizing the Calendar
  1153. ========================
  1154.  
  1155.    If you set the variable `view-diary-entries-initially' to `t',
  1156. calling up the calendar automatically displays the diary entries for
  1157. the current date as well.  The diary dates appear only if the current
  1158. date is visible.  If you add both of the following lines to your
  1159. `.emacs' file:
  1160.  
  1161.      (setq view-diary-entries-initially t)
  1162.      (calendar)
  1163.  
  1164. they display both the calendar and diary windows whenever you start
  1165. Emacs.
  1166.  
  1167.    Similarly, if you set the variable
  1168. `view-calendar-holidays-initially' to `t', entering the calendar
  1169. automatically displays a list of holidays for the current three month
  1170. period.  The holiday list appears in a separate window.
  1171.  
  1172.    You can set the variable `mark-diary-entries-in-calendar' to `t' in
  1173. order to place a plus sign (`+') beside any dates with diary entries.
  1174. Whenever the calendar window is displayed or redisplayed, the diary
  1175. entries are automatically marked for holidays.
  1176.  
  1177.    Similarly, setting the variable `mark-holidays-in-calendar' to `t'
  1178. places an asterisk (`*') after all holiday dates visible in the
  1179. calendar window.
  1180.  
  1181.    There are many customizations that you can make with the hooks
  1182. provided.  For example, the variable `calendar-load-hook', whose
  1183. default value is `nil', is a normal hook run when the calendar package
  1184. is first loaded (before actually starting to display the calendar).
  1185.  
  1186.    The variable `initial-calendar-window-hook', whose default value is
  1187. `nil', is a normal hook run the first time the calendar window is
  1188. displayed.  The function is invoked only when you first enter Calendar
  1189. mode, not when you redisplay an existing Calendar window.  But if you
  1190. leave the calendar with the `q' command and reenter it, the hook runs
  1191. again.
  1192.  
  1193.    The variable `today-visible-calendar-hook', whose default value is
  1194. `nil', is a normal hook run after the calendar buffer has been prepared
  1195. with the calendar when the current date is visible in the window.  One
  1196. use of this hook is to replace today's date with asterisks; a function
  1197. `calendar-star-date' is included for this purpose.  In your `.emacs'
  1198. file, put:
  1199.  
  1200.      (setq today-visible-calendar-hook 'calendar-star-date)
  1201.  
  1202. Another standard hook function adds asterisks around the current date.
  1203. Here's how to use it:
  1204.  
  1205.      (setq today-visible-calendar-hook 'calendar-mark-today)
  1206.  
  1207. A corresponding variable, `today-invisible-calendar-hook', whose
  1208. default value is `nil', is a normal hook run after the calendar buffer
  1209. text has been prepared, if the current date is *not* visible in the
  1210. window.
  1211.  
  1212.